<?php

namespace App\Listener;

use App\Events\WorkshopCreated;
use App\Repository\WorkShopRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class WorkshopSlider implements ShouldQueue
{
    protected $workShopRepository;
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(WorkShopRepository $workShopRepository)
    {
        $this->workShopRepository=$workShopRepository;
    }

    /**
     * Handle the event.
     *
     * @param  WorkshopCreated  $event
     * @return void
     */
    public function handle(WorkshopCreated $event)
    {
        $this->workShopRepository::setSlider($event->workshop);
    }
}
